package io.seata.samples.integration.storage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.seata.samples.integration.entity.TStorage;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * * @author lidong
 * @since 2019-09-04
 */
public interface TStorageMapper extends BaseMapper<TStorage> {

    @Update("update t_storage set count = count - #{count} where id = #{id}")
    int decreaseStorage(@Param("id") Integer id, @Param("count") int count);
}
